package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.utils.EnvSetup;

/************************************************************************************

 ************************************************************************************/
public class DeliveryQueryWapper {
	SqlManager manage;

	public DeliveryQueryWapper() {
		manage = new SqlManager("ymt" + EnvSetup.getEnv());
	}

	/**
	 * @param orderId
	 * @return See YmtProductsInActivityWapper#selectNewActiveProductInfo
	 * @see DeliveryQueryWapper#selectNewActiveProductInfo
	 * @throws InterruptedException
	 */
	/**
	 * billno_rule
	 * @return
	 * @throws InterruptedException
	 */
	public List<String> getBillCodesByOrderId(int orderId)
			throws InterruptedException {

		List<String> pia = manage
				.getSelectResults(
						"com.ymttest.database.mapping.DeliveryQueryMapper.getBillCodesByOrderId",
						orderId);
		return pia;
	}
	/**
	 * 关闭数据库连接
	 */
	public void close() {
		manage.close();
	}

	@Override
	protected void finalize() throws Throwable {
		this.close();
		manage = null;
		super.finalize();
	}

	public static void main(String args[]) throws InterruptedException {

		Logger.debug(new DeliveryQueryWapper()
				.getBillCodesByOrderId(2138563130));

	}
}
